'''
Created on Apr 10, 2011
Execution will start from this file
This can be triggered from crontab / windows scheduler
@author: yc30v1m
'''
#from library.TestCases import TestCases
from library.AutoLoad import AutoLoad
from plugins.timeprofile import timeprofile
import logging.handlers
LOG_FILENAME = "macysdbtesting.log"
logging.getLogger('').setLevel(logging.INFO)
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=10000000, backupCount=1)
format = "%(asctime)s::%(levelname)s - File::%(name)s - Line::%(lineno)d - Function::%(funcName)s - %(message)s"
handler.setFormatter(logging.Formatter(format))
logging.getLogger('').addHandler(handler)

log = logging.getLogger(__name__)

class Run(object):
    '''
    classdocs
    '''
   
    def __init__(self):
        '''
        Constructor
        '''
        try:
            aut = AutoLoad.ClassAsObject("library.Automation")
        except:
            AutoLoad.logExceptionInfo()

if __name__ == "__main__":
    profiler = timeprofile()
    # Mark time
    profiler.mark()
    print "\n"
    Run()
    #print '*******************************************************' 
    print 'Total Execution Time (sec)s: ' + str(profiler.timegap())
    
    
        